#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    QString result = "今天的计划是：";
    if(ui->checkBox_study->isChecked() == true)
    {
        result += ui->checkBox_study->text();
        result += "、";
    }
    if(ui->checkBox_play->isChecked() == true)
    {
        result += ui->checkBox_play->text();
        result += "、";
    }
    if(ui->checkBox_sing->isChecked() == true)
    {
        result += ui->checkBox_sing->text();
    }
    //设置到label里面
    ui->label->setText(result);
}
